package xiegd.com.springbootuse.demo.lazy;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

/**
 * @Author: xieguangda
 * @Description:
 * @Date: 2023/9/15 17:04
 */
@ComponentScan("xiegd.com.springbootuse.demo.lazy")
@Configuration
public class ConfigLazy {

    @Bean
    @Lazy
    public Son getSon() {
        System.out.println("son 准备被实例化了啦啦啦啦啦啦");
        return new Son();
    }
}
